package com.moyang.learn.alibabanacosconfigclient.rest;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope
public class TestRest {

    @Value("${title:111}")
    private String title;

    @Value("${moyang.name}")
    private String name;

    @GetMapping("title")
    public String title() {
        return "返回的是:" + this.title;
    }
    @GetMapping("name")
    public String name(){
        return "返回的是:" + this.name;
    }


}
